﻿using System;
using System.Threading.Tasks;
using MahApps.Metro.Controls;
using MahApps.Metro.Controls.Dialogs;


namespace UGD
{
    public class DialogService : IDialogService
    {
        private readonly MetroWindow _metroWindow;

        public DialogService(MetroWindow metroWindow)
        {
            _metroWindow = metroWindow;
        }

        public Task<MessageDialogResult> AskQuestionAsync(string title, string message)
        {
            var settings = new MetroDialogSettings() { AnimateShow = true, AffirmativeButtonText = "Yes", NegativeButtonText = "No" };

            return _metroWindow.ShowMessageAsync(title, message, MessageDialogStyle.AffirmativeAndNegative, settings);
        }


        public Task<string> AskForInputAsync(string title, string message)
        {
            var settings = new MetroDialogSettings() {AnimateShow = true, FirstAuxiliaryButtonText = "Import", NegativeButtonText = "Cancel"};

            return _metroWindow.ShowInputAsync(title, message, settings);
        }

    

        
    }

}
